<?php
namespace app\admin\validate;

use think\Validate;

class Am extends Validate
{
    protected $rule = [
        'brand' => 'require',
//        'pic' => 'require',

        'Particularyear' => 'require',

        'status' => 'require|in:0,1',
    ];

    protected $message = [
        'brand' => '{%brand_val}',
//        'pic' => '{%pic_val}',

        'Particularyear' => '{%Particularyear_val}',
        'cid' => '{%cid_val}',
        'tid' => '{%tid_val}',
        'status' => '{%status_val}',
        'create_time' => '{%create_time_val}',
    ];

    protected $scene = [
        'add'   => ['brand', 'pic', 'mid', 'Particularyear', 'cid', 'tid', 'status', 'create_time'],
        'edit'  => ['brand', 'pic', 'mid', 'Particularyear', 'cid', 'tid', 'status', 'create_time'],
        'status' => ['status'],
        'title' => ['title'],
        'writer' => ['writer'],
    ];
}